/**
 * 
 * @authors liuqinglin (2961181429@qq.com)
 * @date    2016-11-21 20:12:42
 * @version $Id$
 */
 $(document).ready(function(){
 
 	//获取浏览器可视高度
 	var height=$(window).height()-53;
 	$("#menu-content").css("height",height);
 	$("#content_wrapper").css("height",height);
 	
 	//导航菜单
 	$(".nav_main").hover(function(){
 		$(this).children('ul').slideDown(300);
 	},function(){
 		$(this).children('ul').slideUp(300);
 	})

 	//左侧菜单
 	$('.menu-main>a').click(function(){
 		
 		var ulNode = $(this).next('ul');

 		var imgNode = $(this).children("img");

 		if(ulNode.css('display')=='none')
 		{
 			ulNode.slideDown();
 			imgNode.attr("src","application/views/images/menu_minus.gif");
 		}
 		else if(ulNode.css('display')=='block')
 		{
 			ulNode.slideUp();
 			imgNode.attr("src","application/views/images/menu_plus.gif");
 		}
 		// ulNode.slideToggle();
 		
 	})

 	//更新显示时间
 	setInterval(function(){
		$("#time").html(currentTime);
	},1000);

 })
//获取时间
 function currentTime(){
		var t = new Date();
		var str = " ";
		str+=t.getFullYear()+'年';
		str+=t.getMonth()+1+'月';
		str+=t.getDate()+'日';
		str+=t.getHours()+'时';
		str+=t.getMinutes()+'分';
		str+=t.getSeconds()+'秒';
		return str;
	}
